var tools = {
    getUrlParams(urlStr, urlKey) {
        const url = new URL(urlStr)
        var reg = new RegExp('[\?\&]' + urlKey + '=([^\&]*)(\&?)', 'i')
        var r = url.search.match(reg)
        return r ? r[1] : ''
    }
}
